From adec4de13140bc12f8820b0c092bee5f49b2638e Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 13 Dec 2005 03:47:47 +0100 Subject: [PATCH] Fix rx buffer allocation in netfront. The final allocation size was ending up bigger than PAGE_SIZE. Signed-off-by: Keir Fraser --- linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c index 5fd59bc9f5..3115c5dafa 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -540,8 +540,8 @@ static void network_alloc_rx_buffers(struct net_device *dev) * tailroom then round down to SKB_DATA_ALIGN boundary. */ skb = alloc_xen_skb( - (PAGE_SIZE - 16 - sizeof(struct skb_shared_info)) & - (-SKB_DATA_ALIGN(1))); + ((PAGE_SIZE - sizeof(struct skb_shared_info)) & + (-SKB_DATA_ALIGN(1))) - 16); if (skb == NULL) break; __skb_queue_tail(&np->rx_batch, skb); -- 2.30.2